/*
 * Created on 12.01.2004
 * Local Projects Database
 * Mihai Postelnicu (mihai@ro-gateway.org)
 * (c) 2003 by eRomania Gateway
 */
package ro.gateway.aida.struts.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import ro.gateway.aida.obj.db.ActivityDB;
import ro.gateway.aida.struts.MultiTilesAction;
import ro.xblue.translator.TranslatorUtils;


/**
 * @author Mihai Postelnicu<p>
 *
 *  e-mail (mihai@ro-gateway.org)<br>
 * (c) 2003 by eRomania Gateway<p>
 */
public class WhatsNewAction extends MultiTilesAction {
    private ActivityDB adb;

    public ActionForward modePrepare(ActionMapping mapping, ActionForm form,
        HttpServletRequest request, HttpServletResponse response)
        throws Exception {
		String lang = TranslatorUtils.getCurrentLanguage(request, sc).getLanguage();
               
        adb=ActivityDB.getManager(token);
        //TODO: implement user what's new
        request.setAttribute("wnlist",adb.getWhatsNew(lang,3));

        return mapping.findForward("whatsnew");
    }

    public ActionForward modeSelect(ActionMapping mapping, ActionForm form,
        HttpServletRequest request, HttpServletResponse response)
        throws Exception {
        // TODO Auto-generated method stub
        return null;
    }
}
